Skip to content

Conversation

Chriztiaan
Copy link
Contributor

@Chriztiaan Chriztiaan commented Sep 2, 2024

As part of the prebundling work, fast-base64-decode was thought to be bundled in the crypto.js vendor file that gets injected in the rollup config. Turns out it is not the case, and sometimes this caused projects to fail startup if the dependency wasn't installed.

This fix takes the small dependency and manually adds its code to the vendor file, instead of trying to figure out how to bundle a dependency that gets injected. Both the crypto and fast-base64-decode libraries are from the same author so this felt okayish.

I have tested this fix on both the monorepo and a standalone React native project.

Dev release available at:

"@powersync/react": "0.0.0-dev-20240903063630",
"@powersync/common": "0.0.0-dev-20240903063630",
"@powersync/react-native": "0.0.0-dev-20240903063630",
"@powersync/web": "0.0.0-dev-20240903063630"

Copy link

changeset-bot bot commented Sep 2, 2024

🦋 Changeset detected

Latest commit: 958dad3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/react-native Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Chriztiaan Chriztiaan marked this pull request as ready for review September 3, 2024 07:00
stevensJourney
stevensJourney previously approved these changes Sep 3, 2024
Copy link
Collaborator

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the issue of fast-base64-decode could not be resolved for me in my copy of the Ignite PowerSync template app.

@Chriztiaan Chriztiaan merged commit b4d64f0 into main Sep 4, 2024
@Chriztiaan Chriztiaan deleted the fix/fast-base64-decode branch September 4, 2024 06:59
@Chriztiaan Chriztiaan restored the fix/fast-base64-decode branch September 4, 2024 06:59
@Chriztiaan Chriztiaan deleted the fix/fast-base64-decode branch September 4, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants